package com.kasinf.sample.mq.redis.config;

import com.kasinf.framework.cache.utils.RedisUtils;
import jakarta.annotation.PostConstruct;
import org.springframework.context.annotation.Configuration;

/**
 * 消费者绑定
 *
 * @Author : Kaiser
 * @Date: 2025/5/23  14:21
 */
@Configuration
public class ConsumerConfig {


    @PostConstruct
    public void init() {
        // 订阅主题
        RedisUtils.subscribe("test-topic", String.class, message -> {
            System.out.println("Received message: " + message);
        });
    }
}
